package com.imc.beans;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * UserMessage entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "user_message", catalog = "imcdbserver")
public class UserMessage implements java.io.Serializable {

	// Fields

	private long num;
	private Integer dst;
	private Integer src;
	private String tid;
	private String timeStamp;
	private String timeLimit;
	private String content;
	private Integer fileNumSign;
	private Integer offlineMsgType;
	private String msgGuid;
	private Integer keepTime;
	private String srcIp;

	// Constructors

	/** default constructor */
	public UserMessage() {
	}

	/** minimal constructor */
	public UserMessage(Integer dst, Integer src, Integer keepTime, String srcIp) {
		this.dst = dst;
		this.src = src;
		this.keepTime = keepTime;
		this.srcIp = srcIp;
	}

	/** full constructor */
	public UserMessage(Integer dst, Integer src, String tid, String timeStamp,
			String timeLimit, String content, Integer fileNumSign,
			Integer offlineMsgType, String msgGuid, Integer keepTime,
			String srcIp) {
		this.dst = dst;
		this.src = src;
		this.tid = tid;
		this.timeStamp = timeStamp;
		this.timeLimit = timeLimit;
		this.content = content;
		this.fileNumSign = fileNumSign;
		this.offlineMsgType = offlineMsgType;
		this.msgGuid = msgGuid;
		this.keepTime = keepTime;
		this.srcIp = srcIp;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "num", unique = true, nullable = false)
	public long getNum() {
		return this.num;
	}

	public void setNum(long num) {
		this.num = num;
	}

	@Column(name = "dst", nullable = false)
	public Integer getDst() {
		return this.dst;
	}

	public void setDst(Integer dst) {
		this.dst = dst;
	}

	@Column(name = "src", nullable = false)
	public Integer getSrc() {
		return this.src;
	}

	public void setSrc(Integer src) {
		this.src = src;
	}

	@Column(name = "tid", length = 65535)
	public String getTid() {
		return this.tid;
	}

	public void setTid(String tid) {
		this.tid = tid;
	}

	@Column(name = "time_stamp", length = 20)
	public String getTimeStamp() {
		return this.timeStamp;
	}

	public void setTimeStamp(String timeStamp) {
		this.timeStamp = timeStamp;
	}

	@Column(name = "time_limit", length = 20)
	public String getTimeLimit() {
		return this.timeLimit;
	}

	public void setTimeLimit(String timeLimit) {
		this.timeLimit = timeLimit;
	}

	@Column(name = "content", length = 16777215)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "file_num_sign")
	public Integer getFileNumSign() {
		return this.fileNumSign;
	}

	public void setFileNumSign(Integer fileNumSign) {
		this.fileNumSign = fileNumSign;
	}

	@Column(name = "offline_msg_type")
	public Integer getOfflineMsgType() {
		return this.offlineMsgType;
	}

	public void setOfflineMsgType(Integer offlineMsgType) {
		this.offlineMsgType = offlineMsgType;
	}

	@Column(name = "msg_guid", length = 20)
	public String getMsgGuid() {
		return this.msgGuid;
	}

	public void setMsgGuid(String msgGuid) {
		this.msgGuid = msgGuid;
	}

	@Column(name = "keep_time", nullable = false)
	public Integer getKeepTime() {
		return this.keepTime;
	}

	public void setKeepTime(Integer keepTime) {
		this.keepTime = keepTime;
	}

	@Column(name = "src_ip", nullable = false, length = 20)
	public String getSrcIp() {
		return this.srcIp;
	}

	public void setSrcIp(String srcIp) {
		this.srcIp = srcIp;
	}

}